home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Georgia Wildfire Prevention
/
Georgia Wildfire Prevention.iso
/
pc
/
media
/
dirs
/
BackUp
/
PrescribedBurn.dir
/
00009_Script_MovieTimer Behavior
< prev
next >
Wrap
Text File
|
2002-10-15
|
1KB
|
52 lines
--MOVIETIMER--
--Attach to movie so it can send messages to the sprites letting them know which movie is playing and how far along it is.
property SpNum, MyNum, MyName, CurrentMovie, Guard, guard2
--Captures the spritenumber, etc.
on new me
SpNum = me.spritenum
MyNum=sprite(SpNum).member.number
MyName=member(MyNum).name
CurrentMovie = "Setting"
Guard = 0
guard2 = 0
end
--Sends the movie time to the sprites.
on prepareframe me
if guard = 0 then
sendallsprites(#FireUp) --initializes the sprites.
guard = 1
end if
set TheTime = sprite(Spnum).movietime
-- member("Timer").text = CurrentMovie && string(TheTime) --For Development only.
if TheTime = member(CurrentMovie).duration then
case (CurrentMovie) of
"Setting" : CurrentMovie = "FireBreak"
"FireBreak" : CurrentMovie = "BackingFire"
"BackingFire" : CurrentMovie = "BlackLine"
"BlackLine" : CurrentMovie = "SpotHeadFire"
"SpotHeadFire" : CurrentMovie = "HumanFireBreak"
end case
sprite(SpNum).membernum = member(CurrentMovie).number
end if
if CurrentMovie = "HumanFireBreak" and TheTime = member(CurrentMovie).duration and guard2 = 0 then
sendallsprites(#changetoggle)
guard2 = 1
end if
sendallsprites(#countercheck, TheTime, CurrentMovie)
updateStage
end